<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>滴答办公系统-班级新增</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="media/layui/css/layui.css" media="all">
<script type="text/javascript" src="media/js/jquery.min.js"></script>
	<script type="text/javascript">

		function rell() {
			var oldpass = $("[name='pass']").val();
			if (oldpass==''){
				$("[name='pass']+span").text("请输入原密码").css("color","red")
				return false;
			}else {
				$("[name='pass']+span").text("");
			}
			var pass1 = $("[name='pass1']").val();
			if (pass1==''){
				$("[name='pass1']+span").text("请输入新密码").css("color","red")
				return false;
			}else {
				$("[name='pass1']+span").text("");
			}
			var pass2 = $("[name='pass2']").val();
			if (pass2 != pass1){
				$("[name='pass2']+span").text("两次输入密码不一致").css("color","red")
				return false;
			}else {
				$("[name='pass2']+span").text("");
			}
			return true;

		}



	</script>
</head>
<body>
	<div class="layui-container" style="margin-top: 5px">
		<form class="layui-form" action="/update_pass" method="post" onsubmit="return rell();">
			<div class="layui-form-item">
				<label class="layui-form-label">原始密码</label>
				<div class="layui-input-block">
					<input type="password" name="pass" lay-verify="name" autocomplete="off"
						placeholder="请输入密码" class="layui-input">
					<span></span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">新密码</label>
				<div class="layui-input-block">
				 <input type="password" name="pass1" class="layui-input">
					<span></span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">确认新密码</label>
				<div class="layui-input-block">
			      <input type="password" name="pass2" class="layui-input">
					<span></span>
				</div>
			</div>
			<div class="layui-form-item">
				<input class="layui-btn"  style="margin-left: 10%" type="submit" value="确认修改">
				<span></span>
			</div>
		</form>
	</div>


	<script src="media/layui/layui.js"></script>
	<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
	<script>

	</script>
</body>
</html>